package com.choudou5.solr.framework.bean;

import java.io.Serializable;

/**
 * @Name：Http响应对象
 * @@author choudou5
 * @@date 2018-07-02
 */
public class HttpRespBean implements Serializable {

    private int statusCode = 200;
    private String message;
    private Object data;
    private long timestamp = System.currentTimeMillis();

    public HttpRespBean(Object data) {
        this.data = data;
    }

    public HttpRespBean(String message, int statusCode) {
        this.message = message;
        this.statusCode = statusCode;
    }

    public HttpRespBean(Object data, String message, int statusCode) {
        this.data = data;
        this.message = message;
        this.statusCode = statusCode;
    }

    public HttpRespBean(Exception e, String message, int statusCode) {
        this.message = message;
        this.statusCode = statusCode;
    }

    public int getStatusCode() {
        return statusCode;
    }

    public void setStatusCode(int statusCode) {
        this.statusCode = statusCode;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public Object getData() {
        return data;
    }

    public void setData(Object data) {
        this.data = data;
    }

    public long getTimestamp() {
        return timestamp;
    }
}

